perm filename TAK.TIM[TIM,LSP]1 blob sn#620909 filedate 1981-10-30 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	Takeuchi function of various types
C00006 ENDMK
CāŠ—;
Takeuchi function of various types

On the Dolphin, (TAK 18. 12. 6.) took 11.195 seconds compiled
On the Foonly it took (MacLisp)        4.1   seconds compiled
On SAIL (MacLisp)		        .83  seconds compiled
On SAIL (Bummed MacLisp)		.79  seconds compiled
On MIT CADR			       3.1   seconds compiled
On Diablo (Franz)		       2.1   seconds compiled
On Diablo (C)			       1.35  seconds
On 68000 (C)			       1.9   seconds
On 68000 (machine language)		.7   seconds
On SAIL (machine language)		.255 seconds (wholine)
On SAIL (machine language)		.184 seconds (ebox-does not include mem)
On SCORE (machine language)		.162 seconds (ebox)
On S-1 Mark I (machine language)        .114 seconds (ebox & ibox)

47707 function calls
max recursion depth is 18
average recursion depth is 15.4

(defun tak (x y z)
       (cond ((not (< y x))
	      z)
	     (t (tak (tak (1- x) y z)
		     (tak (1- y) z x)
		     (tak (1- z) x y))))))